/*
 * @Descripttion:
 * @version:
 * @Author: kl2018
 * @Date: 2019-06-05 17:49:47
 * @LastEditors: kl2018
 * @LastEditTime: 2020-08-18 14:59:09
 */

import { observer } from 'mobx-react';
import BaseListComponent from './common/BaseListComponent';
import TodoStore from '../stores/TodoStore';
import { hashHistory } from 'react-router';


// 注入数据对象
// @inject("todoStore")
@observer
/**
 * 待办公文组件
 */
class DoComponent extends BaseListComponent {
  constructor(props) {
    super(props);
    const locationQuery = {
      isNew: true,
      ...props.location.query,
      iscomplete: 1,
      type: 'done',
    };
    const todoStore = new TodoStore(locationQuery);
    this.state = {
      listStore: todoStore,
    };
    hashHistory.replace({
      pathname: '/main/offical/customPage',
      query: {
        customListId: -6,
        ...props.location.query,
      },
    });
  }
}

export default props => <DoComponent ecId={`${this && this.props && this.props.ecId || ''}_DoComponent@we1sxd`} {...props} key={props.location.query.officalType || '0'} />;

